package com.example.boot_web.util;

import org.thymeleaf.TemplateEngine;
import org.thymeleaf.context.Context;


/**
 * Created with IntelliJ IDEA.
 * ClassName: TestThy
 * Package: com.example.boot_web.util
 * Description:
 * User: fzykd
 *
 * @Author: LQH
 * Date: 2023-05-16
 * Time: 11:52
 */

public class TestThy {
    public static void main(String[] args) {

        //创建模板引擎
        TemplateEngine engine = new TemplateEngine();
        //准备模板
        String input = "<input type='text' th:value='hellothymeleaf'/>";
        //准备数据
        Context context = new Context();
        //调用引擎 处理模板数据
        String out = engine.process(input,context);
        System.out.println("结果数据: " + out);
    }
}
